package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.time.LocalDateTime;

@Data
public class Family {
    @JsonProperty("family_id")
    private Integer familyId;
    
    @JsonProperty(value = "family_name")
    private String familyName;
    
    private String address;
    
    @JsonProperty("admin_user_id")
    private Integer adminUserId;
    
    @JsonProperty("created_at")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime createdAt;
    
    // 移除JsonProperty注解，只用于接收请求参数
    private transient String name;
    
    public void setName(String name) {
        this.name = name;
        this.familyName = name;
    }
} 